#include <algorithm>
#include <iostream>

#include "Array2D.h"

using namespace std;

Array2D::Array2D(const Array2D& that) {
    delete[] this->p;
    if (this != &that) {
        this->p = new float[that.r * that.c];
        this->r = that.r;
        this->c = that.c;
        for (int i = 0; i < r * c; i++) {
            this->p[i] = that.p[i];
        }
    }
}